package com.cmz.common.config;

import com.google.common.collect.Sets;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

import java.util.Set;

/**
 * @author cmz
 */
@Configuration
@ConfigurationProperties(prefix = "ark.reflection")
@Data
public class SdkPackageScanConfig {

    private final static String DEFAULT_BASE_PACKAGE = "com.scfsoft";

    /** 反射扫包路径：用于限定反射扫描范围 */
    private String basePackage = DEFAULT_BASE_PACKAGE;

    public Set<String> getBasePackages() {
        Set<String> basePackages = Sets.newHashSet();
        basePackages.add(DEFAULT_BASE_PACKAGE);
        basePackages.add(this.basePackage);
        return basePackages;
    }

}
